﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DispatchEnd.aspx.cs" Inherits="Services_DispatchEnd" %>
<html>
<head>
<title>无标题页</title>
<link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/rl.js"></script>
<script type="text/javascript" src="../js/submit.js"></script>
<script type="text/javascript">
function account()
{
	var wxfy=document.getElementById("txtwxfy").value;
	var bjfy=document.getElementById("txtbjfy").value;
	var clfy=document.getElementById("txtclfy").value;
	var qtfy=document.getElementById("txtqtfy").value;
	var tdfy=document.getElementById("txttdfy").value;//填单费用
	if(wxfy==""||bjfy==""||clfy==""||qtfy==""||tdfy=="")
	{
		document.getElementById("txtzr").value="";
	}
	else if(isNaN(wxfy))
	{
		alert('数量格式有误，必须由数字组成!');
		return false;
	}
	else if(isNaN(bjfy))
	{
		alert('数量格式有误，必须由数字组成!');
		return false;
	}
	else if(isNaN(clfy))
	{
		alert('数量格式有误，必须由数字组成!');
		return false;
	}
	else if(isNaN(qtfy))
	{
		alert('数量格式有误，必须由数字组成!');
		return false;
	}
	else if(isNaN(tdfy))
	{
		alert('数量格式有误，必须由数字组成!');
		return false;
	}
	else if(wxfy!=""&&bjfy!=""&&clfy!=""&&qtfy!=""&&tdfy!=""&&!isNaN(wxfy)&&!isNaN(bjfy)&&!isNaN(clfy)&&!isNaN(qtfy)&&!isNaN(tdfy))
	{
		document.getElementById("txtzr").value=Number(wxfy)+Number(bjfy)+Number(clfy)+Number(qtfy)+Number(tdfy);
		
	}
}


    
//查询客户资料信息
function selectOutStock(maintmen)
{
var pos,str,para,parastr,tempstr1; 
tempstr=""; 
str = window.location.href; 
pos = str.indexOf("?") 
parastr = str.substring(pos+1);  
if(maintmen!="")
{
   var result =window.showModalDialog("selectOutStock.aspx?maintmen="+escape(maintmen)+"&"+parastr,"","dialogWidth:600px;dialogHeight:500px;scroll:yes;help:0;status:no;");
     if(result!=undefined)
     {
         document.getElementById("txtbjzyh").innerText=result.split('|')[0];
         document.getElementById("txtbjms").innerText=result.split('|')[1]; 
         document.getElementById("HidPjId").innerText=result.split('|')[2];
         document.getElementById("txtbjfy").innerText=result.split('|')[3];
      }
      else
      {
        alert('您未选择配件信息！');
      }
}
}
</script>
</head>
<body >
    <form id="form1" runat="server" onSubmit=" checknull(this)">
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="31" height="22">
                    <img src="../images/module.gif" width="20" height="22"></td>
                <td style="width: 335px"><asp:Label ID="lblPath" runat="server"></asp:Label> >> 维修结算</td>
                <td  align="right">[ <a href="javascript:location.href=document.referrer;" class="F_red"><font color="red">返回</font></a> ] </td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="1" cellspacing="1" class="tabGg">
            <tr>
                <td  colspan="4" bgcolor="#FFFFFF" style="color: #3366ff; text-align: left">
                    <table width="100%" border="0">
                        <tr>
                            <td align="center" style="text-align: left;" colspan="2">
                                <asp:Label ID="lblMsg" runat="server" Text="业务编号：" ForeColor="Red"></asp:Label>
                                <asp:Label ID="lblDh" runat="server"></asp:Label>&nbsp;</td>
                        </tr>
                    </table>                    </td>
            </tr>
             <tr bgcolor="#3CB6E5" height="5px">            </tr>
            <tr><td bgcolor="#ffffff" colspan="4" height="22" style="color: #3366ff; text-align: left">
                <strong>客户基本信息</strong></td></tr>
            <tr>
                <td width="15%" height="25" bgcolor="#ffffff" class="r_bg">客户名称：</td>
                <td bgcolor="#ffffff" class="right_bg F_red">
                    <asp:TextBox ID="txtGuestName" runat="server" CssClass="input1" onkeyup="startRequest()"  check_null="客户名称不能为空"></asp:TextBox></td>
                <td bgcolor="#ffffff" class="r_bg" width="14%">联 系 人：</td>
                <td bgcolor="#ffffff" class="right_bg" width="37%"><asp:TextBox ID="txtManName" runat="server" CssClass="input1"></asp:TextBox></td>
            </tr>
            <tr>
                <td width="15%" height="26" bgcolor="#FFFFFF" class="r_bg">联系电话：</td>
                <td bgcolor="#FFFFFF" class="right_bg"><asp:TextBox ID="txtPhone" runat="server" CssClass="input1" check_null="联系电话不能为空"></asp:TextBox></td>
                <td width="14%" bgcolor="#FFFFFF" class="r_bg">客户地址：</td>
                <td width="37%" bgcolor="#FFFFFF" class="right_bg"><asp:TextBox ID="txtAddress" runat="server" CssClass="input1" check_null="客户地址不能为空"></asp:TextBox></td>
            </tr>
            <tr bgcolor="#3CB6E5" height="5px">            </tr>
            <tr><td colspan="4" style="color: #3366ff; text-align: left" height="22" bgcolor="#ffffff">
                <strong>商品基本信息</strong></td></tr>
            <tr>
                <td height="28" bgcolor="#FFFFFF" class="r_bg">商品类型：</td>
                <td bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="txtcomitype" runat="server" CssClass="input1" check_null="商品类型不能为空"></asp:TextBox></td>
                <td bgcolor="#FFFFFF" class="r_bg">商品品牌：</td>
                <td bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="txtBrand" runat="server" CssClass="input1" check_null="商品品牌不能为空"></asp:TextBox></td>
            </tr>
            <tr>
                <td height="24" bgcolor="#FFFFFF" class="r_bg">规格型号：</td>
                <td bgcolor="#FFFFFF" class="right_bg" >
                   <asp:TextBox ID="txtSpeci" runat="server" CssClass="input1" check_null="规格型号不能为空"></asp:TextBox></td>
                <td bgcolor="#FFFFFF" class="r_bg" >购买日期：</td>
                <td bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="txtDispTime" runat="server" CssClass="input1" onclick="SelectDate(this.id)"  check_null="购买日期不能为空"></asp:TextBox></td>
            </tr>
            <tr>
                <td rowspan="2" bgcolor="#FFFFFF" class="r_bg">随机附件：</td>
                <td rowspan="2" bgcolor="#FFFFFF" class="right_bg" ><asp:TextBox ID="txtsjfj" runat="server" CssClass="input1"></asp:TextBox></td>
                <td bgcolor="#FFFFFF" class="r_bg" >序列号1：</td>
                <td bgcolor="#FFFFFF" class="right_bg"><asp:TextBox ID="txtxlh1" runat="server" CssClass="input1" ></asp:TextBox></td>
            </tr>
            <tr>
              <td bgcolor="#FFFFFF" class="r_bg" >序列号2：</td>
              <td bgcolor="#FFFFFF" class="right_bg"><asp:TextBox ID="txtxlh2" runat="server"  CssClass="input1"></asp:TextBox></td>
            </tr>
            
            <tr bgcolor="#3CB6E5" height="5px">            </tr>
            <tr>
                <td height="22"   style="color: #3366ff; text-align: left; font-weight: bold;" colspan="4" bgcolor="#ffffff">要求服务信息</td>
            </tr>
            <tr>
                <td bgcolor="#ffffff" class="r_bg">维修日期：</td>
                <td bgcolor="#ffffff" class="right_bg" ><asp:TextBox ID="txtMaintDate" runat="server" CssClass="input1" check_null="维修日期不能为空"  onclick="SelectDate(this.id)"></asp:TextBox></td>
                <td bgcolor="#ffffff" class="r_bg">维 修 人：</td>
                <td bgcolor="#ffffff" class="right_bg"><asp:DropDownList ID="ddlName" runat="server"  check_null="维修人不能为空"></asp:DropDownList></td>
            </tr>
            <tr>
                <td height="22" bgcolor="#FFFFFF" class="r_bg">报修故障：</td>
                <td bgcolor="#FFFFFF" class="right_bg" ><asp:TextBox ID="txtMaintTrouble" runat="server" CssClass="input1" Width="200px"></asp:TextBox></td>
                    <td bgcolor="#ffffff" class="r_bg">预约时间：</td>
                <td bgcolor="#ffffff" class="right_bg" ><asp:TextBox ID="txtBespeakDate" runat="server" CssClass="input1" check_null="预约日期不能为空"  onclick="SelectDate(this.id)"></asp:TextBox></tr>
          
             
             <tr id="t1" >
                <th height="22"  style="color: #3366ff; text-align: left; font-weight: bold;" colspan="4" bgcolor="#ffffff">服务情况反馈</th>
            </tr>
            <tr id="t2" >
                <th bgcolor="#ffffff" class="r_bg" style="height: 26px" >
                    服务类型：</th>
                <td bgcolor="#ffffff" class="right_bg" style="width: 294px; height: 26px;" >
                    <asp:DropDownList ID="sertype" runat="server" check_null="选择服务类型">
                        <asp:ListItem Value="">—选择服务类型—</asp:ListItem>
                        <asp:ListItem>维修</asp:ListItem>
                        <asp:ListItem>安装</asp:ListItem>
                    </asp:DropDownList></td>
                <th bgcolor="#ffffff" class="r_bg" style="height: 26px"  >
                    服务方式：</th>
                <td bgcolor="#ffffff" class="right_bg" style="height: 26px" >
                   <asp:DropDownList ID="ddlserfs" runat="server" check_null="选择服务方式">
                        <asp:ListItem Value="">—选择服务方式—</asp:ListItem>
                        <asp:ListItem>上门</asp:ListItem>
                        <asp:ListItem>送修</asp:ListItem>
                    </asp:DropDownList></td>
            </tr>
            <tr id="t3" >
                <th bgcolor="#FFFFFF" class="r_bg" >
                    遗留原因：</th>
                <td bgcolor="#FFFFFF" class="right_bg" >
                    <asp:DropDownList ID="ddlylyy" runat="server" check_null="选择遗留原因">
                        <asp:ListItem>—选择遗留原因—</asp:ListItem>
                        <asp:ListItem>拉修</asp:ListItem>
                        <asp:ListItem>正在维修</asp:ListItem>
                        <asp:ListItem>等待配件</asp:ListItem>
                        <asp:ListItem>改约</asp:ListItem>
                        <asp:ListItem>维修完成</asp:ListItem>
                    </asp:DropDownList>
                    <asp:TextBox ID="txtylyy" runat="server" CssClass="input1"></asp:TextBox></td>
                <th bgcolor="#FFFFFF" class="r_bg" >保修情况：</th>
                <td bgcolor="#FFFFFF" class="right_bg" >
                    <asp:DropDownList ID="ddlbxqk" runat="server" check_null="选择保修情况">
                        <asp:ListItem Value="">—选择保修情况—</asp:ListItem>
                        <asp:ListItem>保内</asp:ListItem>
                        <asp:ListItem>保外</asp:ListItem>
                    </asp:DropDownList></td>
            </tr>
            <tr id="t4" >
                <th bgcolor="#ffffff" class="r_bg" >服务措施：</th>
                <td bgcolor="#ffffff" class="right_bg" colspan="3" ><asp:TextBox ID="txtGuestYJ" runat="server" Text="空"  onBlur="if(this.value=='')this.value='空'"   onFocus="if(this.value=='空')this.value=''"  Columns="40" Rows="5" TextMode="MultiLine"></asp:TextBox></td>
            </tr>
            
            <tr id="t5" >
                <th height="22" colspan="2" bgcolor="#ffffff"  style="color: #3366ff; text-align: left; font-weight: bold;">收费信息 </th>
                <th height="22" bgcolor="#ffffff" class="r_bg">收费总金额：</th>
                <th height="22" align="left" bgcolor="#ffffff" class="right_bg"><asp:TextBox ID="txtzr" runat="server" CssClass="input1"  Text="0" onblur="if(this.value=='')this.value='0'"   onfocus="if(this.value=='0')this.value=''"></asp:TextBox>
                元</th>
            </tr>
            <tr id="t6" >
                <th bgcolor="#ffffff" class="r_bg" >维 修 费：</th>
                <td bgcolor="#ffffff" class="right_bg" ><asp:TextBox ID="txtwxfy" runat="server" CssClass="input1"  Text="0" onkeyup="account()" onBlur="if(this.value=='')this.value='0'"   onFocus="if(this.value=='0')this.value=''"></asp:TextBox>元</td>
                <th bgcolor="#ffffff" class="r_bg" >备 件 费：</th>
                <td bgcolor="#ffffff" class="right_bg" >
                   <asp:TextBox ID="txtbjfy" runat="server" CssClass="input1"  Text="0" onkeyup="account()" onBlur="if(this.value=='')this.value='0'"   onFocus="if(this.value=='0')this.value=''"></asp:TextBox>元</td>
            </tr>
            <tr id="t7" > 
                <th bgcolor="#ffffff" class="r_bg" >材 料 费：</th>
                <td bgcolor="#ffffff" class="right_bg" >
                    <asp:TextBox ID="txtclfy" runat="server" CssClass="input1"  Text="0" onkeyup="account()" onBlur="if(this.value=='')this.value='0'"   onFocus="if(this.value=='0')this.value=''"></asp:TextBox>元</td>
                <th bgcolor="#ffffff" class="r_bg" >其 它 费：</th>
                <td bgcolor="#ffffff" class="right_bg" >
                    <asp:TextBox ID="txtqtfy" runat="server" CssClass="input1"  Text="0" onkeyup="account()" onBlur="if(this.value=='')this.value='0'"   onFocus="if(this.value=='0')this.value=''"></asp:TextBox>元</td>
            </tr>
            <tr id="t8" >
                <th bgcolor="#ffffff" class="r_bg" >填单费用：</th>
                <td bgcolor="#ffffff" class="right_bg" ><asp:TextBox ID="txttdfy" runat="server" CssClass="input1" onblur="if(this.value=='')this.value='0'"  onfocus="if(this.value=='0')this.value=''" onkeyup="account()" Text="0"></asp:TextBox>
                    元</td>
                <th bgcolor="#ffffff" class="r_bg" >其它费用说明：</th>
                <td bgcolor="#ffffff" class="right_bg" ><asp:TextBox ID="txtqyfysm" runat="server" CssClass="input1" onblur="if(this.value=='')this.value='空'"  onfocus="if(this.value=='空')this.value=''" Text="空" Width="300px"></asp:TextBox></td>
            </tr>
            <tr id="t9" >
                <th height="22"  style="color: #3366ff; text-align: left; font-weight: bold;" colspan="4" bgcolor="#ffffff">备件信息</th>
            </tr>
            <tr id="t10" >
                <th bgcolor="#ffffff" class="r_bg" >备件描述：</th>
                <td bgcolor="#ffffff" class="right_bg" >
                    <asp:TextBox ID="txtbjms" runat="server" CssClass="input1"  ondblclick="selectOutStock(this.form.ddlName.value)"></asp:TextBox><font color="red">*双击选择</font></td>
                <th bgcolor="#ffffff" class="r_bg" >备件专用号：</th>
                <td bgcolor="#ffffff" class="right_bg" ><asp:TextBox ID="txtbjzyh" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:HiddenField ID="HidPjid" runat="server" />
                </td>
            </tr>
            
            <tr id="t11" >
                <th height="22"  style="color: #3366ff; text-align: left; font-weight: bold;" colspan="4" bgcolor="#ffffff">维修员信息</th>
            </tr>
            <tr id="t12" >
                <th bgcolor="#ffffff" class="r_bg" style="height: 26px" >客户评语：</th>
                <td bgcolor="#ffffff" class="right_bg" style="height: 26px" >
                    <asp:DropDownList ID="ddlfwpf" runat="server">
                        <asp:ListItem Value="0">未平分</asp:ListItem>
                        <asp:ListItem Value="3">很好</asp:ListItem>
                        <asp:ListItem Value="2">一般</asp:ListItem>
                        <asp:ListItem Value="1">不好</asp:ListItem>
                    </asp:DropDownList></td>
                <th bgcolor="#ffffff" class="r_bg" style="height: 26px" >维修提成：</th>
                <td bgcolor="#ffffff" class="right_bg" style="height: 26px" >
                   <asp:TextBox ID="txttc" runat="server" CssClass="input1" Text="0" onBlur="if(this.value=='')this.value='0'"   onFocus="if(this.value=='0')this.value=''"></asp:TextBox>元</td>
            </tr>
            <tr id="t19" >
                <th bgcolor="#ffffff" class="r_bg" >客户意见：</th>
                <td bgcolor="#ffffff" class="right_bg" colspan="3" >
                    <asp:TextBox ID="Guestcontent" runat="server" Text="空"  onBlur="if(this.value=='')this.value='空'"   onFocus="if(this.value=='空')this.value=''"  Columns="40" Rows="5" TextMode="MultiLine"></asp:TextBox></td>
            </tr>
            <tr id="t17" >
                <th bgcolor="#FFFFFF" class="r_bg" >操作人员：</th>
                <td bgcolor="#FFFFFF" class="right_bg"  >
                    <asp:Label ID="lblName" runat="server"></asp:Label></td>
                <th bgcolor="#FFFFFF" class="r_bg" >                    完成时间：</th>
                <td bgcolor="#FFFFFF" class="right_bg" >                    
                    <asp:TextBox ID="wcdate" runat="server" CssClass="input1"　onclick="SelectDate(this.id)"></asp:TextBox></td>
            </tr>
            <tr id="t18" >
                <th bgcolor="#FFFFFF" class="r_bg" >                
                    <asp:HiddenField ID="hidModuid" runat="server" />
                    <asp:HiddenField ID="HidGoUrl" runat="server"/>
                 </th>
                <td colspan="3" bgcolor="#FFFFFF" class="right_bg">
                    <asp:Button ID="btnAdd" CssClass="submit" runat="server" Text=" 提交 " OnClick="btnAdd_Click" OnClientClick="return checknull(this.form);"/>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
